#include<stdio.h>
#pragma warning(disable:4996)
int main()
{
	int secends;
	int h;
	int s;
	scanf("%d", &secends);
	printf("h = %d", secends % 3600);
	printf("m = %d", (secends % 3600) / 60);
	printf("s = %d", (secends % 3600) % 60);
	return 0;
}